<?php
/* @var $this LibraryStatusController */
/* @var $model LibraryStatus */
/* @var $form bootstrap.widgets.TbActiveForm */
?>
<?php $form=$this->beginWidget('bootstrap.widgets.TbActiveForm',array(
	'action'=>Yii::app()->createUrl($this->route),
	'method'=>'get',
)); ?>

	<?php echo $form->textFieldRow($model,'id',array('class'=>'span3')); ?>

	<?php echo $form->textFieldRow($model,'name',array('class'=>'span3','maxlength'=>50)); ?>

	<?php echo $form->textFieldRow($model,'slug',array('class'=>'span3','maxlength'=>50)); ?>

	<?php echo $form->labelEx($model,'libraryId'); ?>
		<?php $this->widget('application.extensions.autocomplete.EJuiAutoCompleteFkField', array(
			 'model'=>$model, 
			 'attribute'=>'libraryId', //the FK field (from CJuiInputWidget)
			 // controller method to return the autoComplete data (from CJuiAutoComplete)
			 'sourceUrl'=>Yii::app()->createUrl('/libraryStatus/findLibraryGame'), 
			 'relName'=>'library', // the relation name defined above
			 'displayAttr'=>'GameDisplay',
		)); ?>
		<?php echo $form->error($model,'libraryId'); ?>

	<?php echo $form->textFieldRow($model,'userId',array('class'=>'span3')); ?>
	<?php echo $form->labelEx($model,'create_time'); ?>
	<?php $this->widget('application.extensions.timepicker.EJuiDateTimePicker',array(
			    'model'=>$model,
			    'attribute'=>'create_time',
			    'options'=>array(
					'dateFormat' => 'yy-mm-dd',
					'timeFormat' => 'hh:mm:ss',
					'changeMonth' => true,
					'changeYear' => true,
					'yearRange' => 'c-1:c+10',
				),
			));  
		?>
        <?php echo $form->error($model,'create_time'); ?>

	<div class="form-actions">
		<?php $this->widget('bootstrap.widgets.TbButton', array(
		    'buttonType'=>'submit',
			'type'=>'primary',
			'label'=>'Search',
		)); ?>
	</div>

<?php $this->endWidget(); ?>
